# -*- coding: utf-8 -*-
"""
date: Tue Dec 11 15:21:59 2018
python: Anaconda 3.6.5
author: kanade
email: kanade@blisst.cn
"""
import numpy as np


b = np.arange(1, 25).reshape(2, 3, 4)
print(b)
print(b[:, 0, 0])  # [1 13]
print(b[0]) # [[ 1  2  3  4] [ 5  6  7  8] [ 9 10 11 12]]
print(b[0, :, :])
print(b[0, ...])
print(b[0, 1])  # [5  6  7  8]
print(b[0, 1, ::2])  # [5 7]
print(b[..., 1])
print(b[:, 1])
print(b[0, 1, 1::2])  # [6 8]
print(b[0, :, -1])  # [4 8 12]
print(b[0, ::-1, -1])  # [12 8 4]
print(b[0, ::2, -1])  # [4 12]
print(b[::-1, ::-1])
print(b[..., ::-1])
print(b[-1, 1:, 2:])

